package com.oig.sys.workflow.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import java.util.Date;
import java.util.List;

@Schema
@Data
public class CronJobVo {


	@Schema(description = "id")
	private Integer id;
	@Schema(description = "任务名")
	private String jobName;
	@Schema(description = "是否启用0-未启用 1-启用,1-立即加入调度")
	private String enable;

	@Schema(description = "任务类型,枚举： 1-HTTP")
	private String jobType;
	@Schema(description = "cron表达式")
	private String scheduleCron;

	@Schema(description = "任务配置,http任务配置 {\"url\":\"执行接口\",\"method\":\"get\",\"header\":[{\"name\":\"\",\"value\":\"\"}],\"body\":{}}")
	private String sourceCfg;

	@Schema(description = "执行动作,枚举数组，暂时 1-通知,2-web_hook")
	private List<String> finishOpts;

	@Schema(description = "通知标题,通知标题")
	private String notifyTitle;
	@Schema(description = "通知内容,是否需要加占位符来处理数据？")
	private String notifyContent;
	@Schema(description = "消息类型 01-定向通知 02-群消息")
	private String notifyType;
	@Schema(description = "推送渠道id")
	private Integer pushChannelId;
	@Schema(description = "推送机器人（渠道名称）")
	private String pushChannelName;
	@Schema(description = "接收人类型")
	private String receiverType;
	@Schema(description = "接收人id")
	private Integer receiverId;
	@Schema(description = "接收人名称")
	private String receiverName;
	@Schema(description = "任务结果是否生成附件,只有http返回列表，或者sql返回list才生成文件")
	private String notifyResFile;

	@Schema(description = "web_hook,预留")
	private String webHook;


	@Schema(description = "创建人id")
	private Integer createUserId;
	@Schema(description = "创建人")
	private String createUserName;
	@Schema(description = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;
	@Schema(description = "最后更新人id")
	private Integer lastUpdateId;
	@Schema(description = "最后更新人")
	private String lastUpdateName;
	@Schema(description = "最后更新时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date lastUpdateTime;


	@Schema(description = "状态")
	private String status;

	@Schema(description = "版本号")
	private Integer version;

	@Schema(description = "所属租户id")
	private Integer tenantId;
	@Schema(description = "所属租户名称")
	private String tenantName;
}
